Skip to content

ci: fix validate-source checks vs stale labels#28843

Open
kolyshkin wants to merge 1 commit into
podman-container-tools:mainfrom
kolyshkin:should-include-tests
Open

ci: fix validate-source checks vs stale labels#28843
kolyshkin wants to merge 1 commit into
podman-container-tools:mainfrom
kolyshkin:should-include-tests

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented Jun 2, 2026

When the validate-source job is re-run manually after adding a label,
it uses stale labels (from the "pull_request" event that originally
triggered it), and so the steps that check labels don't see new labels.

Fix by querying the labels live (similar to how it was done before
commits 6e597af and 1da1541).

Note the logic differs slightly between hack/ci/make-and-check-size.sh
and hack/ci/pr-should-include-tests. This is because
pr-should-include-tests is also executed locally as well as on non-PRs,
while make-and-check-size is run strictly in CI for PRs only.

Fixes: #28838

Does this PR introduce a user-facing change?

NONE

@kolyshkin
Copy link
Copy Markdown
Contributor Author

Added a test commit, waiting for the job to fail.

Copy link
Copy Markdown
Contributor

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Luap99 Luap99 added the No New Tests Allow PR to proceed without adding regression tests label Jun 3, 2026
Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the label and clicked rerun

Note this must be fixed for the bloat approved label below in the same way then

jq -r '.labels[].name')

if grep -F -x -q "$OVERRIDE_LABEL" <<<"$labels"; then
exit 0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe an echo here as debug log to say "$OVERRIDE_LABEL label found, ignoring test requirement" would help.

@kolyshkin kolyshkin force-pushed the should-include-tests branch from 1a4c1bb to 4c0500c Compare June 3, 2026 18:26
@kolyshkin kolyshkin changed the title ci: fix pr-should-include-tests check vs stale labels ci: fix validate-source checks vs stale labels Jun 3, 2026
@kolyshkin kolyshkin force-pushed the should-include-tests branch from 4c0500c to d5a001e Compare June 3, 2026 18:34
@kolyshkin kolyshkin requested a review from Luap99 June 3, 2026 18:35
@packit-as-a-service
Copy link
Copy Markdown

[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore.

When the validate-source job is re-run manually after adding a label,
it uses stale labels (from the "pull_request" event that originally
triggered it), and so the steps that check labels don't see new labels.

Fix by querying the labels live (similar to how it was done before
commits 6e597af and 1da1541).

Note the logic differs slightly between hack/ci/make-and-check-size.sh
and hack/ci/pr-should-include-tests. This is because
pr-should-include-tests is also executed locally as well as on non-PRs,
while make-and-check-size is run strictly in CI for PRs only.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin force-pushed the should-include-tests branch from d5a001e to d05c113 Compare June 3, 2026 18:44
@kolyshkin kolyshkin marked this pull request as ready for review June 3, 2026 18:44
Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No New Tests Allow PR to proceed without adding regression tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: No New Tests label no longer works for reruns

3 participants